<template>
	<div class="newDetails">
		<!-- 头部板块 -->
		<header-new></header-new>
		<!-- 内容主体部分 -->
		<div class="content">
			<detail-left :buildId='buildId' :deptId="deptId" @openVideoControl="getVideoId"></detail-left>
			<detail-right :buildId='buildId' :deptId="deptId" :isVideoControl="videoControlDialog" :isRemoteControl="isShowRemoteControl" @rightopenVideoControl="getRightVideoId" @remoteControl="remoteControl"></detail-right>
		</div>
		<video-control :videoId='videoId' :deptId="deptId" v-if="videoControlDialog" @closeVideoControlModel="isVideoControlModel">
		</video-control>
		<RemoteControl :show.sync="isShowRemoteControl" :deviceId="deviceId" :deptId="deptId" @closeRemoteControl="closeRemoteControl"></RemoteControl>
	</div>
</template>

<script>
	import detailLeft from "@/pages/newDetail/detail-left.vue"
	import detailRight from "@/pages/newDetail/detail-right.vue"
	import headerNew from "@/component/headerNew/headerNew.vue"
	import alarmDevice from "@/component/model/alarm-model.vue"
	import faultModel from "@/component/model/falut-model.vue"
	import videoModel from "@/component/model/video-model.vue"
	import VideoControl from "@/pages/newDetail/videoControl.vue"
	import RemoteControl from "@/component/dealog/RemoteControl.vue"
	
	
	
	
	export default {
		components: {
			detailLeft,
			detailRight,
			alarmDevice,
			faultModel,
			videoModel,
			VideoControl,
			RemoteControl,
			
		},
		data() {
			return {
				day: '',
				week: '',
				time: '',
				sd: '',
				temp: '',
				txt: '',
				alarmDialog: false, //报警弹窗
				deptId: 0, //所属单位id
				buildId: 0, //当前建筑id
				faultDialog: false, //故障弹窗
				videoDialog: false, //视屏报警弹窗
				videoControlDialog: false,
				videoId: '',
				menuList:[
					{id:1,value:1,text:'退出登录'}
				],
				isShowRemoteControl:false,
				alarmhandleShow:false,
				deviceId:'234',
			}
		},
		onLoad(val) {
			this.deptId=Number(val.deptId)
			this.buildId=Number(val.buildId)
		},
		
	
		methods: {
			getVideoId(val){
				this.videoId=val.id
				this.videoControlDialog=val.show
			},
			getRightVideoId(val){
				this.videoId=val.id
				this.videoControlDialog=val.show
			},
			isVideoControlModel(val){
				this.videoControlDialog=val
			},
			closeRemoteControl(val){
				this.isShowRemoteControl=val
			},
			remoteControl(val){
				this.deviceId=val.id
				this.isShowRemoteControl=true
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	.newDetails {
		min-width: 1200px;
		height: 100%;
		overflow: hidden;
		background: url(../../static/img/bg.png) 100% 100%;

		//内容主体部分
		.content {
			width: 100%;
			display: flex;
		}
	}
</style>
